IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spTdoctran_Update')
	BEGIN
		PRINT 'Dropping Procedure spTdoctran_Update'
		DROP  Procedure  spTdoctran_Update
	END

GO

PRINT 'Creating Procedure spTdoctran_Update'
GO
Create Procedure dbo.spTdoctran_Update
	( 	  
		@d_id varchar(50) = null, 
		@d_datetime DateTime = null, 
		@d_status varchar(50) = null, 
		@d_descrip varchar(254) = null, 
		@d_releasetype varchar(50) = null, 
		@d_releasereason varchar(500) = null, 
		@d_primaryattorney varchar(100) = null, 
		@d_secondaryattorney varchar(100) = null, 
		@d_releasedate DateTime = null, 
		@d_returndate DateTime = null, 
		@d_primaryattorneyletterreference varchar(50) = null, 
		@d_secondaryattorneyletterreference varchar(50) = null, 
		@d_trackingnumber varchar(100) = null, 
		@d_user varchar(50) = null, 
		@d_workstation varchar(50) = null, 
		@d_uniqueid uniqueidentifier
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 8/25/2007    Initial version Updated
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Update the required new record
	UPDATE Tdoctran
	SET
		d_datetime = @d_datetime, 
		d_status = @d_status, 
		d_descrip = @d_descrip, 
		d_releasetype = @d_releasetype, 
		d_releasereason = @d_releasereason, 
		d_primaryattorney = @d_primaryattorney, 
		d_secondaryattorney = @d_secondaryattorney, 
		d_releasedate = @d_releasedate, 
		d_returndate = @d_returndate, 
		d_primaryattorneyletterreference = @d_primaryattorneyletterreference, 
		d_secondaryattorneyletterreference = @d_secondaryattorneyletterreference, 
		d_trackingnumber = @d_trackingnumber, 
		d_user = @d_user, 
		d_workstation = @d_workstation, 
		d_uniqueid = @d_uniqueid		
	WHERE d_id = @d_id

	-- Return to calling method
	RETURN
	
GO
